//
//  NewsViewController.m
//  GoodWayClient
//
//  Created by newhuidong on 16/1/7.
//  Copyright © 2016年 HuiDong. All rights reserved.
//

#import "NewsViewController.h"
#import "OwnerHomeViewController.h"
@interface NewsViewController ()

@end

@implementation NewsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //OwnerHomeViewController * home =[[OwnerHomeViewController alloc]init];
    
    
    self.navigationController.navigationBar.translucent=YES;
    
    NSURL * url =[NSURL URLWithString:@"http://www.acfun.tv/"];
    NSURLRequest * request =[ NSURLRequest requestWithURL:url];
    UIWebView * webView =[[UIWebView alloc]initWithFrame:CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height-64)];
    webView.scalesPageToFit=YES;
    [webView loadRequest:request];
    [self.view addSubview:webView];
}
-(void)viewWillAppear:(BOOL)animated{

    
    self.title=@"最新动态";
    UIButton * button =[[UIButton alloc]initWithFrame:CGRectMake(10, 25, 50, 30)];
    [button setTitle:@"返回" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        [button addTarget:self action:@selector(fanhui) forControlEvents:UIControlEventTouchUpInside];
    
    button.titleLabel.font =[UIFont systemFontOfSize:15];
   
    UIView * view =[[UIView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 64)];
    view.backgroundColor=[UIColor colorWithRed:0/255.0f green:128/255.0f blue:255/255.0f alpha:0.8f];
    
    [self.view addSubview:view];
    [self.view addSubview:button];
    
}
-(void)fanhui{
    
    [self dismissViewControllerAnimated:YES completion:nil];
    
    
}
@end
